<template>
  <div class="wrap" v-if="res.info.data">
    {{res.info.data.id}}
  </div>
</template>

<script setup>
import { useRouter, useRoute } from "vue-router";
import { getCurrentInstance, reactive, ref } from "vue";
const { $axios } = getCurrentInstance().appContext.config.globalProperties;

// 接收 id
const route = useRoute();
let listId = route.query.id;

// 保存变量
let res = reactive({
  info: [],
});
// https://m.lanqb.com/api/daniu/interview/12082
$axios(`/lanqb/api/daniu/interview/${listId}`, "GET").then(({ data }) => {
  res.info = data;
  console.log(res.info);
});
</script>

<style lang="less"></style>
